package sk.stuba.fiit.clientApp.controller;


import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.tsp.TSPAlgorithms;

public class ClientUtil {
	//constants
	public final static String OUTPUT_PACKAGE = "output.zip";
	public final static int  OUTPUT_PACKAGE_VALUE = 1;
	public final static int  ARCHIVE_PACKAGE_VALUE = 2;
	public final static int  XML_FILE_VALU = 3;
	public static final int TS_FILE_VALU = 4;
	

	public static ASN1ObjectIdentifier getASN1ObjIdFromString(String algorithm) {
		if (algorithm.equals("MD5"))
			return TSPAlgorithms.MD5;
		if (algorithm.equals("SHA-1"))
			return TSPAlgorithms.SHA1;
		if (algorithm.equals("SHA-256"))
			return TSPAlgorithms.SHA256;
		if (algorithm.equals("SHA-384"))
			return TSPAlgorithms.SHA384;
		if (algorithm.equals("SHA-512"))
			return TSPAlgorithms.SHA512;
		return TSPAlgorithms.SHA1;
	}
}
